<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        // 34343434@qq.com
        // 3ohdsifj324oeo@sina.info.cn
        // dfdfdfe@baidubaidubaidu.com
        // dfreoruejifdgtre@mi.com
        // 10000@qq.com
        var reg = /^\w+@$\w+(\.[a-z]{2,4}){1,2}/ ; // i 不区分大小写
        var str = "abcdef";
        console.log(reg.exec(str)); // 贪婪匹配
    </script>
</head>
<body>


</body>
</html>